//	ID : pallab81
// 	PROG : 260
// 	LANG : C++
// 	2011-07-04-19.28.55 Monday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>

using namespace std;

#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long

/*
Black tries to join row 1 with row N
White tries to join column 1 with column N.
*/
char mat[ 210 ][ 210 ];
int n;

inline void read() {
    int i,j;
    for(i=1; i<=n; ++i) {
        for(j=1; j<=n; ++j) {
            cin>>mat[i][j];
        }
    }
}
/*
( i-1 , j-1 ) , ( i-1 ,  j  )
(  i  , j-1 ) , (  i  , j+1 )
( i+1 ,  j  ) , ( i+l , j+1 )
*/
bool flag;
inline void recur(int i, int j){
    if(flag)return ;

    if( i-1 > 0 ){
        if( j-1 > 0 && mat[i-1][j-1]=='b' ){
            mat[i-1][j-1]='~';
            recur( i-1 , j-1 );
        }
        if( mat[i-1][j]=='b'){
            mat[i-1][j]='~';
            recur( i-1, j);
        }
    }
    if(i+1 <= n ){
        if(i+1==n && mat[i+1][j]=='b' ){
            flag=true;
        }
        if(i+1==n && j+1 <=n && mat[i+1][j+1]=='b'){
            flag=true;
        }
        if( mat[i+1][j]=='b'){
            mat[i+1][j]='~';
            recur( i+1,j );
        }
        if( j+1 <=n && mat[i+1][j+1]=='b' ){
            mat[i+1][j+1]='~';
            recur( i+1, j+1 );
        }
    }
    if( j-1 > 0 && mat[i][j-1]=='b' ){
            mat[i][j-1]='~';
            recur(i,j-1);
    }
    if( j+1 <=n && mat[i][j+1]=='b' ){
            mat[i][j+1]='~';
            recur(i,j+1);
    }
return ;
}

inline void proc(int cases) {
    int r,c;
    flag=false;
        for(c=1;c<=n;++c){
            if( mat[1][c]=='b'){
                recur(1,c);
                if(flag)break;
            }
        }

    cout<<cases<<" "<<( flag ? 'B' : 'W')<<"\n";
}
int main() {
    int cases;
    cases=1;
    while( scanf("%d",&n) == 1 && (n!=0) ) {
        read();
        proc( cases );
        ++cases;
    }

    return 0;
}

